

# s1 = "ABC"
# s2 = "123"
# 目标生成一个列表['A1', 'A2', 'A3', 'B1', 'B2', ...]

s1 = "ABC"
s2 = "123"
result = []
for x in s1:
    for y in s2:
        result.append(x + y)
        # print(x+y)
print("result:", result)

# 用列表推导式实现上述功能
result2 = [x+y for x in s1 for y in s2 ]
print('result2:', result2)
